<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: 'app',
  mounted: function () {
    // 监听浏览器尺寸变化，更新尺寸变量，用于后续页面尺寸计算调整使用
    window.onresize = () => {
      return (() => {
          this.updateClientSize();
      })();
    };
    this.updateClientSize();
  },
  methods: {
    updateClientSize: function () {
      this.$store.commit('updateInnerWidth', document.body.clientWidth);
      this.$store.commit('updateInnerHeight', document.body.clientHeight);
    }
  }
}
</script>

<style>
</style>
